import request from '@/utils/request'

// 章节列表
export function categoryList(params) {
  return request({
    url: '/course/category/list',
    method: 'get',
    params
  })
}

// 查询章节详细
export function getcategory(timeId) {
  return request({
    url: '/course/category/' + timeId,
    method: 'get'
  })
}

// 新增章节
export function addcategory(data) {
  return request({
    url: '/course/category',
    method: 'post',
    data: data
  })
}

// 修改章节
export function updatecategory(data) {
  return request({
    url: '/course/category',
    method: 'put',
    data: data
  })
}

// 删除章节
export function delcategory(timeId) {
  return request({
    url: '/course/category/' + timeId,
    method: 'delete'
  })
}